using Koala.Pro.Common;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace Koala.Pro.Helpers;

public sealed class NumberToVisibilityReConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        double? num = value.ToDoubleOrNull();
        return (num.HasValue && num > 0.0) ? Visibility.Collapsed : Visibility.Visible;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
